/**
 * 
 */
package sg.edu.nus.iss.team8s.vmcs.payment;

/**
 * @author Wang Shi Jie
 *
 */
public class CashcardPayment implements PaymentMode {
	private CashcardReceiver receiver;
	
	public CashcardPayment(Object receiver){
		System.out.println("<CashcardPayment> - constructor() : create new CashcardPayment");
		
		if(receiver instanceof CashcardReceiver){
			this.receiver = (CashcardReceiver)receiver;
		}
		System.out.println("<CashcardPayment> - constructor() : set CashcardReceiver");
	}
	
	public void handlePayment(){
		System.out.println("<CashcardPayment> - handlePayment() : handle payment");
		receiver.processCashcardPayment();
	}
}
